"""empty message

Revision ID: 8e93b3d900d5
Revises: f109ce4161dd
Create Date: 2018-06-02 16:02:37.283411

"""
from alembic import op
import sqlalchemy as sa
import sqlalchemy_utils


# revision identifiers, used by Alembic.
revision = '8e93b3d900d5'
down_revision = 'f109ce4161dd'
branch_labels = None
depends_on = None
ROLES = (
    ('LIMIT', "受限用户"),
    ("NORMAL", "普通用户"),
    ("GROUP", "群组用户"),
    ("ADMIN", "管理员"),
)

def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('f_config',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('server_name', sa.String(length=100), nullable=True),
    sa.Column('is_register', sa.Integer(), nullable=True),
    sa.Column('default_reg_role', sqlalchemy_utils.types.choice.ChoiceType(ROLES), nullable=True),
    sa.Column('backup_ip', sa.String(length=100), nullable=True),
    sa.Column('backup_port', sa.Integer(), nullable=True),
    sa.Column('backup_base_path', sa.String(length=500), nullable=True),
    sa.Column('update_time', sa.DATETIME(), nullable=True),
    sa.Column('create_time', sa.DATETIME(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('f_config')
    # ### end Alembic commands ###
